export const common = {
    requestData(store, json) {
        return store.state.api.post(json.path, json.data);
    },
    getMenuData(store) {
        return new Promise((resolve, reject) => {
            store
                .dispatch("requestData", { path: "/getMenuData", data: {} })
                .then((v) => {
                    resolve(v);
                })
                .catch((v) => {
                    reject(v);
                });
        });
    },
};